package com.d0305;
import sun.reflect.annotation.ExceptionProxy;
import java.util.Scanner;

public class Hero {
    int N;
    int EXP;
    {
        EXP=0;
    }
    void Hero(int p_N){
        this.N=p_N;
        if(p_N<=30&&p_N>=0) {
            if (p_N == 0) {
                EXP = 0;
            }
            else {
                EXP = 30 * (N * N * N + 5 * N) - 80;
            }
        }
    }

    public static void main(String[] args) {
        Hero hero = new Hero();
        System.out.println("请输入英雄等级0-30");
        Scanner input=new Scanner(System.in);
        int sc=input.nextInt();
        hero.Hero(sc);
        System.out.println("英雄等级为"+hero.N);
        System.out.println("英雄经验值为"+hero.EXP);

    }
}


